Optimal. Leaf size=265 \[ \frac {\left (a^2 (A c-c C-B d)-b^2 (A c-c C-B d)+2 a b (B c+(A-C) d)\right ) x}{\left (a^2+b^2\right )^2}+\frac {\left (2 a b (A c-c C-B d)-a^2 (B c+(A-C) d)+b^2 (B c+(A-C) d)\right ) \log (\cos (e+f x))}{\left (a^2+b^2\right )^2 f}+\frac {\left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right ) \log (a+b \tan (e+f x))}{b^2 \left (a^2+b^2\right )^2 f}-\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 265, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {3716, 3707,
3698, 31, 3556} \begin {gather*} -\frac {(b c-a d) \left (A b^2-a (b B-a C)\right )}{b^2 f \left (a^2+b^2\right ) (a+b \tan (e+f x))}+\frac {\log (\cos (e+f x)) \left (-\left (a^2 (d (A-C)+B c)\right )+2 a b (A c-B d-c C)+b^2 (d (A-C)+B c)\right )}{f \left (a^2+b^2\right )^2}+\frac {x \left (a^2 (A c-B d-c C)+2 a b (d (A-C)+B c)-b^2 (A c-B d-c C)\right )}{\left (a^2+b^2\right )^2}+\frac {\left (a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right ) \log (a+b \tan (e+f x))}{b^2 f \left (a^2+b^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3556
Rule 3698
Rule 3707
Rule 3716
Rubi steps
\begin {align*} \int \frac {(c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^2} \, dx &=-\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))}+\frac {\int \frac {a^2 C d+b^2 (B c+A d)+a b (A c-c C-B d)-b (A b c-a B c-b c C-a A d-b B d+a C d) \tan (e+f x)+\left (a^2+b^2\right ) C d \tan ^2(e+f x)}{a+b \tan (e+f x)} \, dx}{b \left (a^2+b^2\right )}\\ &=\frac {\left (a^2 (A c-c C-B d)-b^2 (A c-c C-B d)+2 a b (B c+(A-C) d)\right ) x}{\left (a^2+b^2\right )^2}-\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))}+\frac {\left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right ) \int \frac {1+\tan ^2(e+f x)}{a+b \tan (e+f x)} \, dx}{b \left (a^2+b^2\right )^2}-\frac {\left (2 a b (A c-c C-B d)-a^2 (B c+(A-C) d)+b^2 (B c+(A-C) d)\right ) \int \tan (e+f x) \, dx}{\left (a^2+b^2\right )^2}\\ &=\frac {\left (a^2 (A c-c C-B d)-b^2 (A c-c C-B d)+2 a b (B c+(A-C) d)\right ) x}{\left (a^2+b^2\right )^2}+\frac {\left (2 a b (A c-c C-B d)-a^2 (B c+(A-C) d)+b^2 (B c+(A-C) d)\right ) \log (\cos (e+f x))}{\left (a^2+b^2\right )^2 f}-\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))}+\frac {\left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right ) \text {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \tan (e+f x)\right )}{b^2 \left (a^2+b^2\right )^2 f}\\ &=\frac {\left (a^2 (A c-c C-B d)-b^2 (A c-c C-B d)+2 a b (B c+(A-C) d)\right ) x}{\left (a^2+b^2\right )^2}+\frac {\left (2 a b (A c-c C-B d)-a^2 (B c+(A-C) d)+b^2 (B c+(A-C) d)\right ) \log (\cos (e+f x))}{\left (a^2+b^2\right )^2 f}+\frac {\left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right ) \log (a+b \tan (e+f x))}{b^2 \left (a^2+b^2\right )^2 f}-\frac {\left (A b^2-a (b B-a C)\right ) (b c-a d)}{b^2 \left (a^2+b^2\right ) f (a+b \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 4.49, size = 589, normalized size = 2.22 \begin {gather*} \frac {a^2 \left (2 (a+i b)^2 \left (A b^2 (c-i d)+i a^2 C d+2 a b C d+b^2 (-i B c-c C-B d)\right ) (e+f x)-2 \left (a^2+b^2\right )^2 C d \log (\cos (e+f x))+\left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right ) \log \left ((a \cos (e+f x)+b \sin (e+f x))^2\right )\right )+b \left (2 (a+i b) \left (-i A b^4 c+i a^4 C d (i+e+f x)+a b^3 (A c (1+i e+i f x)-i c C (e+f x)-i B d (e+f x)+B c (i+e+f x)+A d (i+e+f x))-i a^2 b^2 (i A c (e+f x)-2 C d (e+f x)+B c (-i+e+f x)+A d (-i+e+f x)-i c C (i+e+f x)-i B d (i+e+f x))+a^3 b (c C+d (B+C (i+e+f x)))\right )-2 a \left (a^2+b^2\right )^2 C d \log (\cos (e+f x))+a \left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right ) \log \left ((a \cos (e+f x)+b \sin (e+f x))^2\right )\right ) \tan (e+f x)-2 i a \left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right ) \text {ArcTan}(\tan (e+f x)) (a+b \tan (e+f x))}{2 a b^2 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.32, size = 321, normalized size = 1.21
method | result | size |
derivativedivides | \(\frac {-\frac {-A a \,b^{2} d +A \,b^{3} c +B \,a^{2} b d -B a \,b^{2} c -a^{3} C d +C \,a^{2} b c}{b^{2} \left (a^{2}+b^{2}\right ) \left (a +b \tan \left (f x +e \right )\right )}+\frac {\left (-A \,a^{2} b^{2} d +2 A a \,b^{3} c +A \,b^{4} d -B \,a^{2} b^{2} c -2 B a \,b^{3} d +B \,b^{4} c +a^{4} C d +3 C \,a^{2} b^{2} d -2 C a \,b^{3} c \right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{2} b^{2}}+\frac {\frac {\left (A \,a^{2} d -2 A a b c -A \,b^{2} d +B \,a^{2} c +2 B a b d -B \,b^{2} c -C \,a^{2} d +2 C a b c +C \,b^{2} d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (A \,a^{2} c +2 A a b d -A \,b^{2} c -B \,a^{2} d +2 B a b c +B \,b^{2} d -C \,a^{2} c -2 C a b d +C \,b^{2} c \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{2}}}{f}\) | \(321\) |
default | \(\frac {-\frac {-A a \,b^{2} d +A \,b^{3} c +B \,a^{2} b d -B a \,b^{2} c -a^{3} C d +C \,a^{2} b c}{b^{2} \left (a^{2}+b^{2}\right ) \left (a +b \tan \left (f x +e \right )\right )}+\frac {\left (-A \,a^{2} b^{2} d +2 A a \,b^{3} c +A \,b^{4} d -B \,a^{2} b^{2} c -2 B a \,b^{3} d +B \,b^{4} c +a^{4} C d +3 C \,a^{2} b^{2} d -2 C a \,b^{3} c \right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{2} b^{2}}+\frac {\frac {\left (A \,a^{2} d -2 A a b c -A \,b^{2} d +B \,a^{2} c +2 B a b d -B \,b^{2} c -C \,a^{2} d +2 C a b c +C \,b^{2} d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (A \,a^{2} c +2 A a b d -A \,b^{2} c -B \,a^{2} d +2 B a b c +B \,b^{2} d -C \,a^{2} c -2 C a b d +C \,b^{2} c \right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (a^{2}+b^{2}\right )^{2}}}{f}\) | \(321\) |
norman | \(\frac {\frac {a \left (A \,a^{2} c +2 A a b d -A \,b^{2} c -B \,a^{2} d +2 B a b c +B \,b^{2} d -C \,a^{2} c -2 C a b d +C \,b^{2} c \right ) x}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {A a \,b^{2} d -A \,b^{3} c -B \,a^{2} b d +B a \,b^{2} c +a^{3} C d -C \,a^{2} b c}{b^{2} f \left (a^{2}+b^{2}\right )}+\frac {b \left (A \,a^{2} c +2 A a b d -A \,b^{2} c -B \,a^{2} d +2 B a b c +B \,b^{2} d -C \,a^{2} c -2 C a b d +C \,b^{2} c \right ) x \tan \left (f x +e \right )}{a^{4}+2 a^{2} b^{2}+b^{4}}}{a +b \tan \left (f x +e \right )}+\frac {\left (A \,a^{2} d -2 A a b c -A \,b^{2} d +B \,a^{2} c +2 B a b d -B \,b^{2} c -C \,a^{2} d +2 C a b c +C \,b^{2} d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}-\frac {\left (A \,a^{2} b^{2} d -2 A a \,b^{3} c -A \,b^{4} d +B \,a^{2} b^{2} c +2 B a \,b^{3} d -B \,b^{4} c -a^{4} C d -3 C \,a^{2} b^{2} d +2 C a \,b^{3} c \right ) \ln \left (a +b \tan \left (f x +e \right )\right )}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) f \,b^{2}}\) | \(439\) |
risch | \(\text {Expression too large to display}\) | \(1523\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 342, normalized size = 1.29 \begin {gather*} \frac {\frac {2 \, {\left ({\left ({\left (A - C\right )} a^{2} + 2 \, B a b - {\left (A - C\right )} b^{2}\right )} c - {\left (B a^{2} - 2 \, {\left (A - C\right )} a b - B b^{2}\right )} d\right )} {\left (f x + e\right )}}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac {2 \, {\left ({\left (B a^{2} b^{2} - 2 \, {\left (A - C\right )} a b^{3} - B b^{4}\right )} c - {\left (C a^{4} - {\left (A - 3 \, C\right )} a^{2} b^{2} - 2 \, B a b^{3} + A b^{4}\right )} d\right )} \log \left (b \tan \left (f x + e\right ) + a\right )}{a^{4} b^{2} + 2 \, a^{2} b^{4} + b^{6}} + \frac {{\left ({\left (B a^{2} - 2 \, {\left (A - C\right )} a b - B b^{2}\right )} c + {\left ({\left (A - C\right )} a^{2} + 2 \, B a b - {\left (A - C\right )} b^{2}\right )} d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac {2 \, {\left ({\left (C a^{2} b - B a b^{2} + A b^{3}\right )} c - {\left (C a^{3} - B a^{2} b + A a b^{2}\right )} d\right )}}{a^{3} b^{2} + a b^{4} + {\left (a^{2} b^{3} + b^{5}\right )} \tan \left (f x + e\right )}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 564 vs.
\(2 (268) = 536\).
time = 6.44, size = 564, normalized size = 2.13 \begin {gather*} \frac {2 \, {\left ({\left ({\left (A - C\right )} a^{3} b^{2} + 2 \, B a^{2} b^{3} - {\left (A - C\right )} a b^{4}\right )} c - {\left (B a^{3} b^{2} - 2 \, {\left (A - C\right )} a^{2} b^{3} - B a b^{4}\right )} d\right )} f x - 2 \, {\left (C a^{2} b^{3} - B a b^{4} + A b^{5}\right )} c + 2 \, {\left (C a^{3} b^{2} - B a^{2} b^{3} + A a b^{4}\right )} d - {\left ({\left (B a^{3} b^{2} - 2 \, {\left (A - C\right )} a^{2} b^{3} - B a b^{4}\right )} c - {\left (C a^{5} - {\left (A - 3 \, C\right )} a^{3} b^{2} - 2 \, B a^{2} b^{3} + A a b^{4}\right )} d + {\left ({\left (B a^{2} b^{3} - 2 \, {\left (A - C\right )} a b^{4} - B b^{5}\right )} c - {\left (C a^{4} b - {\left (A - 3 \, C\right )} a^{2} b^{3} - 2 \, B a b^{4} + A b^{5}\right )} d\right )} \tan \left (f x + e\right )\right )} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{2} + 2 \, a b \tan \left (f x + e\right ) + a^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) - {\left ({\left (C a^{4} b + 2 \, C a^{2} b^{3} + C b^{5}\right )} d \tan \left (f x + e\right ) + {\left (C a^{5} + 2 \, C a^{3} b^{2} + C a b^{4}\right )} d\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, {\left ({\left ({\left ({\left (A - C\right )} a^{2} b^{3} + 2 \, B a b^{4} - {\left (A - C\right )} b^{5}\right )} c - {\left (B a^{2} b^{3} - 2 \, {\left (A - C\right )} a b^{4} - B b^{5}\right )} d\right )} f x + {\left (C a^{3} b^{2} - B a^{2} b^{3} + A a b^{4}\right )} c - {\left (C a^{4} b - B a^{3} b^{2} + A a^{2} b^{3}\right )} d\right )} \tan \left (f x + e\right )}{2 \, {\left ({\left (a^{4} b^{3} + 2 \, a^{2} b^{5} + b^{7}\right )} f \tan \left (f x + e\right ) + {\left (a^{5} b^{2} + 2 \, a^{3} b^{4} + a b^{6}\right )} f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 1.65, size = 9721, normalized size = 36.68 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.76, size = 531, normalized size = 2.00 \begin {gather*} \frac {\frac {2 \, {\left (A a^{2} c - C a^{2} c + 2 \, B a b c - A b^{2} c + C b^{2} c - B a^{2} d + 2 \, A a b d - 2 \, C a b d + B b^{2} d\right )} {\left (f x + e\right )}}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {{\left (B a^{2} c - 2 \, A a b c + 2 \, C a b c - B b^{2} c + A a^{2} d - C a^{2} d + 2 \, B a b d - A b^{2} d + C b^{2} d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} - \frac {2 \, {\left (B a^{2} b^{2} c - 2 \, A a b^{3} c + 2 \, C a b^{3} c - B b^{4} c - C a^{4} d + A a^{2} b^{2} d - 3 \, C a^{2} b^{2} d + 2 \, B a b^{3} d - A b^{4} d\right )} \log \left ({\left | b \tan \left (f x + e\right ) + a \right |}\right )}{a^{4} b^{2} + 2 \, a^{2} b^{4} + b^{6}} + \frac {2 \, {\left (B a^{2} b^{2} c \tan \left (f x + e\right ) - 2 \, A a b^{3} c \tan \left (f x + e\right ) + 2 \, C a b^{3} c \tan \left (f x + e\right ) - B b^{4} c \tan \left (f x + e\right ) - C a^{4} d \tan \left (f x + e\right ) + A a^{2} b^{2} d \tan \left (f x + e\right ) - 3 \, C a^{2} b^{2} d \tan \left (f x + e\right ) + 2 \, B a b^{3} d \tan \left (f x + e\right ) - A b^{4} d \tan \left (f x + e\right ) - C a^{4} c + 2 \, B a^{3} b c - 3 \, A a^{2} b^{2} c + C a^{2} b^{2} c - A b^{4} c - B a^{4} d + 2 \, A a^{3} b d - 2 \, C a^{3} b d + B a^{2} b^{2} d\right )}}{{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} {\left (b \tan \left (f x + e\right ) + a\right )}}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 21.14, size = 1875, normalized size = 7.08 \begin {gather*} \frac {\ln \left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (b^4\,\left (A\,d+B\,c\right )-b^3\,\left (2\,B\,a\,d-2\,A\,a\,c+2\,C\,a\,c\right )-b^2\,\left (A\,a^2\,d+B\,a^2\,c-3\,C\,a^2\,d\right )+C\,a^4\,d\right )}{f\,\left (a^4\,b^2+2\,a^2\,b^4+b^6\right )}-\frac {\ln \left (\frac {A^2\,a^2\,b^2\,c\,d-A^2\,a\,b^3\,c^2+A^2\,a\,b^3\,d^2-A^2\,b^4\,c\,d+A\,B\,a^2\,b^2\,c^2-A\,B\,a^2\,b^2\,d^2+4\,A\,B\,a\,b^3\,c\,d-A\,B\,b^4\,c^2+A\,B\,b^4\,d^2-A\,C\,a^4\,c\,d-4\,A\,C\,a^2\,b^2\,c\,d+2\,A\,C\,a\,b^3\,c^2-2\,A\,C\,a\,b^3\,d^2+A\,C\,b^4\,c\,d-B^2\,a^2\,b^2\,c\,d+B^2\,a\,b^3\,c^2-B^2\,a\,b^3\,d^2+B^2\,b^4\,c\,d+B\,C\,a^4\,d^2-B\,C\,a^2\,b^2\,c^2+3\,B\,C\,a^2\,b^2\,d^2-4\,B\,C\,a\,b^3\,c\,d+B\,C\,b^4\,c^2+C^2\,a^4\,c\,d+3\,C^2\,a^2\,b^2\,c\,d-C^2\,a\,b^3\,c^2+C^2\,a\,b^3\,d^2}{b\,{\left (a^2+b^2\right )}^2}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (A^2\,a^2\,b^2\,d^2-2\,A^2\,a\,b^3\,c\,d+A^2\,b^4\,c^2+2\,A\,B\,a^2\,b^2\,c\,d-2\,A\,B\,a\,b^3\,c^2+2\,A\,B\,a\,b^3\,d^2-2\,A\,B\,b^4\,c\,d-A\,C\,a^4\,d^2-4\,A\,C\,a^2\,b^2\,d^2+4\,A\,C\,a\,b^3\,c\,d-2\,A\,C\,b^4\,c^2-A\,C\,b^4\,d^2+B^2\,a^2\,b^2\,c^2+2\,B^2\,a\,b^3\,c\,d+B^2\,b^4\,d^2-B\,C\,a^4\,c\,d-4\,B\,C\,a^2\,b^2\,c\,d+2\,B\,C\,a\,b^3\,c^2-2\,B\,C\,a\,b^3\,d^2+B\,C\,b^4\,c\,d+C^2\,a^4\,d^2+3\,C^2\,a^2\,b^2\,d^2-2\,C^2\,a\,b^3\,c\,d+C^2\,b^4\,c^2+C^2\,b^4\,d^2\right )}{b\,{\left (a^2+b^2\right )}^2}+\frac {\left (c+d\,1{}\mathrm {i}\right )\,\left (A-C+B\,1{}\mathrm {i}\right )\,\left (A\,b\,c-B\,b\,d-4\,C\,a\,d-C\,b\,c+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (3\,A\,b^4\,d+3\,B\,b^4\,c+2\,C\,a^4\,d-5\,C\,b^4\,d+4\,A\,a\,b^3\,c-4\,B\,a\,b^3\,d-4\,C\,a\,b^3\,c-A\,a^2\,b^2\,d-B\,a^2\,b^2\,c+C\,a^2\,b^2\,d\right )}{b\,\left (a^2+b^2\right )}+\frac {b\,\left (c+d\,1{}\mathrm {i}\right )\,\left (-\mathrm {tan}\left (e+f\,x\right )\,a^2+4\,a\,b+3\,\mathrm {tan}\left (e+f\,x\right )\,b^2\right )\,\left (A-C+B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )\,1{}\mathrm {i}}{2\,{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )\,\left (A\,c+A\,d\,1{}\mathrm {i}+B\,c\,1{}\mathrm {i}-B\,d-C\,c-C\,d\,1{}\mathrm {i}\right )}{2\,f\,\left (-a^2\,1{}\mathrm {i}+2\,a\,b+b^2\,1{}\mathrm {i}\right )}-\frac {\ln \left (\frac {A^2\,a^2\,b^2\,c\,d-A^2\,a\,b^3\,c^2+A^2\,a\,b^3\,d^2-A^2\,b^4\,c\,d+A\,B\,a^2\,b^2\,c^2-A\,B\,a^2\,b^2\,d^2+4\,A\,B\,a\,b^3\,c\,d-A\,B\,b^4\,c^2+A\,B\,b^4\,d^2-A\,C\,a^4\,c\,d-4\,A\,C\,a^2\,b^2\,c\,d+2\,A\,C\,a\,b^3\,c^2-2\,A\,C\,a\,b^3\,d^2+A\,C\,b^4\,c\,d-B^2\,a^2\,b^2\,c\,d+B^2\,a\,b^3\,c^2-B^2\,a\,b^3\,d^2+B^2\,b^4\,c\,d+B\,C\,a^4\,d^2-B\,C\,a^2\,b^2\,c^2+3\,B\,C\,a^2\,b^2\,d^2-4\,B\,C\,a\,b^3\,c\,d+B\,C\,b^4\,c^2+C^2\,a^4\,c\,d+3\,C^2\,a^2\,b^2\,c\,d-C^2\,a\,b^3\,c^2+C^2\,a\,b^3\,d^2}{b\,{\left (a^2+b^2\right )}^2}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (A^2\,a^2\,b^2\,d^2-2\,A^2\,a\,b^3\,c\,d+A^2\,b^4\,c^2+2\,A\,B\,a^2\,b^2\,c\,d-2\,A\,B\,a\,b^3\,c^2+2\,A\,B\,a\,b^3\,d^2-2\,A\,B\,b^4\,c\,d-A\,C\,a^4\,d^2-4\,A\,C\,a^2\,b^2\,d^2+4\,A\,C\,a\,b^3\,c\,d-2\,A\,C\,b^4\,c^2-A\,C\,b^4\,d^2+B^2\,a^2\,b^2\,c^2+2\,B^2\,a\,b^3\,c\,d+B^2\,b^4\,d^2-B\,C\,a^4\,c\,d-4\,B\,C\,a^2\,b^2\,c\,d+2\,B\,C\,a\,b^3\,c^2-2\,B\,C\,a\,b^3\,d^2+B\,C\,b^4\,c\,d+C^2\,a^4\,d^2+3\,C^2\,a^2\,b^2\,d^2-2\,C^2\,a\,b^3\,c\,d+C^2\,b^4\,c^2+C^2\,b^4\,d^2\right )}{b\,{\left (a^2+b^2\right )}^2}+\frac {\left (d+c\,1{}\mathrm {i}\right )\,\left (C-A+B\,1{}\mathrm {i}\right )\,\left (A\,b\,c-B\,b\,d-4\,C\,a\,d-C\,b\,c+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (3\,A\,b^4\,d+3\,B\,b^4\,c+2\,C\,a^4\,d-5\,C\,b^4\,d+4\,A\,a\,b^3\,c-4\,B\,a\,b^3\,d-4\,C\,a\,b^3\,c-A\,a^2\,b^2\,d-B\,a^2\,b^2\,c+C\,a^2\,b^2\,d\right )}{b\,\left (a^2+b^2\right )}+\frac {b\,\left (d+c\,1{}\mathrm {i}\right )\,\left (-\mathrm {tan}\left (e+f\,x\right )\,a^2+4\,a\,b+3\,\mathrm {tan}\left (e+f\,x\right )\,b^2\right )\,\left (C-A+B\,1{}\mathrm {i}\right )}{{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}{2\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )\,\left (A\,d+B\,c-C\,d+A\,c\,1{}\mathrm {i}-B\,d\,1{}\mathrm {i}-C\,c\,1{}\mathrm {i}\right )}{2\,f\,\left (-a^2+a\,b\,2{}\mathrm {i}+b^2\right )}-\frac {A\,b^3\,c-C\,a^3\,d-A\,a\,b^2\,d-B\,a\,b^2\,c+B\,a^2\,b\,d+C\,a^2\,b\,c}{b^2\,f\,\left (a^2+b^2\right )\,\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________